<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/memberdetail.css" />
<script type="text/javascript">
$(document).ready(function(){	

	var tenderId= ${tenderId};
	var winId = '${winId}';
	$('#product_view_show').parent().append('<table id="product_view_show_'+winId+'"></table>');
	$('#product_view_show').remove();
	
    $('#product_view_show_'+winId).datagrid({
    	url: '${pageContext.request.contextPath}/api/TenderProductAPI.json',
	    title: '招标产品',
	    iconCls: 'icon-product',
	    queryParams: {
        	param: JSON.stringify({
        		tenderId:tenderId
        	})
        },
	    columns: [[
            {field:'product_name', title:'产品名称', width:'100px', align:'left', halign:'center', resizable:false},
            {field:'quantity', title:'数量', width:'80px', align:'center', halign:'center', resizable:false},
            {field:'unit', title:'单位', width:'80px', align:'center', halign:'center', resizable:false},
            {field:'product_description', title:'产品描述', width:'260px', align:'left', halign:'center', resizable:false}               
        ]],
        fit: true,
        fitColumns: true,
        striped: true,
        rownumbers: true,
        autoRowHeight: true,
        idField: 'product_id',
        loadFilter: function(data) {
	        var datax = {};	       
            if(data.status!=0){
            	//取得值异常时，制作空结果集返回
            	datax.total = 0;
            	datax.rows = new Array();
            	return datax;
            }          
            //取得值正常时，将数据过滤后返回	       
            if (data.total && data.total > 0) {
	            datax.total = data.total;
	            datax.rows = data.tplist;	           
	        }else{
	        	datax.total = 0;
            	datax.rows = new Array();
	        }
	        return datax;
	    },
	    onLoadSuccess:function(data) {
	    	
	    }
	});
   
}); 

</script>
<div id="divshow">
	 <table id="tender_table" class="edit_table tender_table">
	      <tr>
	        <th>招标名称</th>
	        <td><label id="tenderTitle" class="tenderlabel"><s:property value='tenderInformationDto.tenderTitle' /></label> </td>
	        <th>招标方式</th>
	        <td ><label id="tenderPattern" class="tenderlabel"><s:property value='tenderInformationDto.tenderPatternName' /></label></td>
	      </tr>       
	      <tr>
	        <th>报名开始日</th>
	        <td><label id="enrollEndDate" class="tenderlabel"><s:property value='tenderInformationDto.enrollEndDate' /></label></td>
	        <th>招标截止日</th>
	        <td><label id="enrollEndDate" class="tenderlabel"><s:property value='tenderInformationDto.enrollEndDate' /></label></td>
	      </tr>        
	      <tr>
	        <th>投标截止日</th>
	        <td><label id="tenderEndDate" class="tenderlabel"><s:property value='tenderInformationDto.tenderEndDate' /></label></td>
	        <th>中标公布日</th>
	        <td><label id="publishResultDate" class="tenderlabel"><s:property value='tenderInformationDto.publishResultDate' /></label></td>
	      </tr>       
	      <tr>
	        <th height="60px">内容说明</th>
	        <td colspan="3"><label id="contentDescription" class="tenderlabellong"><s:property value='tenderInformationDto.contentDescription' /></label></td>
	      </tr>
	     
	      <tr>
	        <th height="60px">供应商要求</th>
	        <td colspan="3" ><label id="vendorRequirement" class="tenderlabellong"><s:property value='tenderInformationDto.vendorRequirement' /></label></td>
	      </tr>
	     
	      <tr>
	        <th>联系人</th>
	        <td><label id="contactName" class="tenderlabel"><s:property value='tenderInformationDto.contactName' /></label></td>
	        <th>联系电话</th>
	        <td><label id="contactTel" class="tenderlabel"><s:property value='tenderInformationDto.contactTel' /></label></td>
	      </tr>    
	</table>
</div>
  <div style="width: 570px; height:260px; margin-left:8px;margin-top:10px;">
    <table id="product_view_show"></table>
  </div>
